home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Sample_dBASE / Mugs / Supplier.wfm < prev    next >
Encoding:
Text File  |  1997-11-20  |  11.2 KB  |  491 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  Supplier.wfm - Mugs Sample Application
  4. //
  5. //  Data entry from for Supplier table.
  6. //
  7. //  Dependencies: MUGS.CFM
  8. //                MUGS.CC
  9. //                SUPPLIER.DMD
  10. //
  11. //  Visual dBASE Samples Group
  12. //
  13. //  $Revision:   1.10  $
  14. //
  15. //  Copyright (c) 1997, Borland International, Inc. 
  16. //  All rights reserved.
  17. //
  18. //---------------------------------------------------------------
  19. SET TALK OFF
  20. ** END HEADER -- do not remove this line
  21. //
  22. // Generated on 10/23/97
  23. //
  24. parameter bModal
  25. local f
  26. f = new supplierForm()
  27. if (bModal)
  28.    f.mdi = false // ensure not MDI
  29.    f.readModal()
  30. else
  31.    f.open()
  32. endif
  33.  
  34. class supplierForm of MUGSDATACFORM from "MUGS.CFM"
  35.    set procedure to MUGS.CC additive
  36.    with (this)
  37.       open = class::FORM_OPEN
  38.       height = 16
  39.       left = 1
  40.       top = 1
  41.       width = 70
  42.       text = "Supplier - Data Entry"
  43.    endwith
  44.  
  45.  
  46.    this.DATAMODREF1 = new DATAMODREF()
  47.    this.DATAMODREF1.parent = this
  48.    with (this.DATAMODREF1)
  49.       filename = "SUPPLIER.DMD"
  50.       dataModClass = "supplierDataModule"
  51.       share = 0
  52.       active = true
  53.       left = -0.1667
  54.       top = -0.0526
  55.    endwith
  56.  
  57.  
  58.    with (this.BOOK1)
  59.       height = 14
  60.       top = 2.5
  61.       width = 70
  62.       metric = 0
  63.    endwith
  64.  
  65.  
  66.    with (this.BOOK1.GRIDROWS)
  67.  
  68.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset
  69.       metric = 0
  70.    endwith
  71.  
  72.  
  73.    this.BOOK1.LABELCOMPANY = new TEXT(this.BOOK1)
  74.    with (this.BOOK1.LABELCOMPANY)
  75.       height = 1
  76.       left = 2
  77.       top = 3
  78.       width = 9.75
  79.       metric = 0
  80.       colorNormal = "BtnText"
  81.       alignVertical = 1
  82.       transparent = true
  83.       fontName = "MS Sans Serif"
  84.       fontSize = 8
  85.       text = "Company:"
  86.    endwith
  87.  
  88.  
  89.    this.BOOK1.LABELCONTACT = new TEXT(this.BOOK1)
  90.    with (this.BOOK1.LABELCONTACT)
  91.       height = 1
  92.       left = 2
  93.       top = 4.5
  94.       width = 9.75
  95.       metric = 0
  96.       colorNormal = "BtnText"
  97.       alignVertical = 1
  98.       transparent = true
  99.       fontName = "MS Sans Serif"
  100.       fontSize = 8
  101.       text = "Contact:"
  102.    endwith
  103.  
  104.  
  105.    this.BOOK1.LABELPHONE = new TEXT(this.BOOK1)
  106.    with (this.BOOK1.LABELPHONE)
  107.       height = 1
  108.       left = 38
  109.       top = 4.5
  110.       width = 6.5
  111.       metric = 0
  112.       colorNormal = "BtnText"
  113.       alignVertical = 1
  114.       alignHorizontal = 2
  115.       transparent = true
  116.       fontName = "MS Sans Serif"
  117.       fontSize = 8
  118.       text = "Phone:"
  119.    endwith
  120.  
  121.  
  122.    this.BOOK1.LABELFAX = new TEXT(this.BOOK1)
  123.    with (this.BOOK1.LABELFAX)
  124.       height = 1
  125.       left = 38
  126.       top = 5.5
  127.       width = 6.5
  128.       metric = 0
  129.       colorNormal = "BtnText"
  130.       alignVertical = 1
  131.       alignHorizontal = 2
  132.       transparent = true
  133.       fontName = "MS Sans Serif"
  134.       fontSize = 8
  135.       text = "Fax:"
  136.    endwith
  137.  
  138.  
  139.    this.BOOK1.LABELEMAIL = new TEXT(this.BOOK1)
  140.    with (this.BOOK1.LABELEMAIL)
  141.       height = 1
  142.       left = 2
  143.       top = 5.5
  144.       width = 9.75
  145.       metric = 0
  146.       colorNormal = "BtnText"
  147.       alignVertical = 1
  148.       transparent = true
  149.       fontName = "MS Sans Serif"
  150.       fontSize = 8
  151.       text = "E-Mail:"
  152.    endwith
  153.  
  154.  
  155.    this.BOOK1.LABELADDRESS = new TEXT(this.BOOK1)
  156.    with (this.BOOK1.LABELADDRESS)
  157.       height = 1
  158.       left = 2
  159.       top = 7
  160.       width = 9.75
  161.       metric = 0
  162.       colorNormal = "BtnText"
  163.       alignVertical = 1
  164.       transparent = true
  165.       fontName = "MS Sans Serif"
  166.       fontSize = 8
  167.       text = "Address:"
  168.    endwith
  169.  
  170.  
  171.    this.BOOK1.LABELCITY = new TEXT(this.BOOK1)
  172.    with (this.BOOK1.LABELCITY)
  173.       height = 1
  174.       left = 2
  175.       top = 9
  176.       width = 9.75
  177.       metric = 0
  178.       colorNormal = "BtnText"
  179.       alignVertical = 1
  180.       transparent = true
  181.       fontName = "MS Sans Serif"
  182.       fontSize = 8
  183.       text = "City:"
  184.    endwith
  185.  
  186.  
  187.    this.BOOK1.LABELSTATE = new TEXT(this.BOOK1)
  188.    with (this.BOOK1.LABELSTATE)
  189.       height = 1
  190.       left = 37
  191.       top = 9
  192.       width = 6.5
  193.       metric = 0
  194.       colorNormal = "BtnText"
  195.       alignVertical = 1
  196.       alignHorizontal = 2
  197.       transparent = true
  198.       fontName = "MS Sans Serif"
  199.       fontSize = 8
  200.       text = "State:"
  201.    endwith
  202.  
  203.  
  204.    this.BOOK1.LABELCOUNTRY = new TEXT(this.BOOK1)
  205.    with (this.BOOK1.LABELCOUNTRY)
  206.       height = 1.1
  207.       left = 2
  208.       top = 10
  209.       width = 9.75
  210.       metric = 0
  211.       colorNormal = "BtnText"
  212.       alignVertical = 1
  213.       transparent = true
  214.       fontName = "MS Sans Serif"
  215.       fontSize = 8
  216.       text = "Country:"
  217.    endwith
  218.  
  219.  
  220.    this.BOOK1.LABELPOSTAL = new TEXT(this.BOOK1)
  221.    with (this.BOOK1.LABELPOSTAL)
  222.       height = 1.1
  223.       left = 28.5
  224.       top = 10
  225.       width = 15
  226.       metric = 0
  227.       colorNormal = "BtnText"
  228.       alignVertical = 1
  229.       alignHorizontal = 2
  230.       transparent = true
  231.       fontName = "MS Sans Serif"
  232.       fontSize = 8
  233.       text = "Zip/Postal Code:"
  234.    endwith
  235.  
  236.  
  237.    this.BOOK1.LABELID = new TEXT(this.BOOK1)
  238.    with (this.BOOK1.LABELID)
  239.       height = 1
  240.       left = 2
  241.       top = 2
  242.       width = 9.75
  243.       metric = 0
  244.       colorNormal = "BtnText"
  245.       alignVertical = 1
  246.       transparent = true
  247.       fontName = "MS Sans Serif"
  248.       fontSize = 8
  249.       text = "ID:"
  250.    endwith
  251.  
  252.  
  253.    this.BOOK1.ENTRYID = new ENTRYFIELD(this.BOOK1)
  254.    with (this.BOOK1.ENTRYID)
  255.       enabled = false
  256.       height = 1
  257.       left = 11.5
  258.       top = 2
  259.       width = 8
  260.       metric = 0
  261.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Supplier ID"]
  262.       picture = "9999999"
  263.       colorHighLight = ""
  264.       fontName = "MS Sans Serif"
  265.       fontSize = 8
  266.       borderStyle = 7
  267.    endwith
  268.  
  269.  
  270.    this.BOOK1.ENTRYPHONE = new ENTRYFIELD(this.BOOK1)
  271.    with (this.BOOK1.ENTRYPHONE)
  272.       height = 1
  273.       left = 45
  274.       top = 4.5
  275.       width = 15
  276.       metric = 0
  277.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Phone"]
  278.       colorHighLight = ""
  279.       fontName = "MS Sans Serif"
  280.       fontSize = 8
  281.       validRequired = true
  282.       borderStyle = 7
  283.    endwith
  284.  
  285.  
  286.    this.BOOK1.ENTRYFAX = new ENTRYFIELD(this.BOOK1)
  287.    with (this.BOOK1.ENTRYFAX)
  288.       height = 1
  289.       left = 45
  290.       top = 5.5
  291.       width = 15
  292.       metric = 0
  293.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Fax"]
  294.       colorHighLight = ""
  295.       fontName = "MS Sans Serif"
  296.       fontSize = 8
  297.       validRequired = true
  298.       borderStyle = 7
  299.    endwith
  300.  
  301.  
  302.    this.BOOK1.COMBOSTATE = new COMBOSTATE(this.BOOK1)
  303.    with (this.BOOK1.COMBOSTATE)
  304.       height = 1.1
  305.       left = 45
  306.       top = 9
  307.       width = 6.5
  308.       metric = 0
  309.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["State ID"]
  310.       fontName = "MS Sans Serif"
  311.       fontSize = 8
  312.    endwith
  313.  
  314.  
  315.    this.BOOK1.COMBOCOUNTRY = new COMBOBOX(this.BOOK1)
  316.    with (this.BOOK1.COMBOCOUNTRY)
  317.       height = 1.1
  318.       left = 11.5
  319.       top = 10
  320.       width = 16
  321.       metric = 0
  322.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Country ID"]
  323.       fontName = "MS Sans Serif"
  324.       fontSize = 8
  325.       style = 1
  326.    endwith
  327.  
  328.  
  329.    this.BOOK1.ENTRYEMAIL = new ENTRYFIELD(this.BOOK1)
  330.    with (this.BOOK1.ENTRYEMAIL)
  331.       height = 1
  332.       left = 11.5
  333.       top = 5.5
  334.       width = 25
  335.       metric = 0
  336.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["EMail"]
  337.       colorHighLight = ""
  338.       fontName = "MS Sans Serif"
  339.       fontSize = 8
  340.       validRequired = true
  341.       borderStyle = 7
  342.    endwith
  343.  
  344.  
  345.    this.BOOK1.ENTRYCOMPANY = new ENTRYFIELD(this.BOOK1)
  346.    with (this.BOOK1.ENTRYCOMPANY)
  347.       height = 1
  348.       left = 11.5
  349.       top = 3
  350.       width = 28
  351.       metric = 0
  352.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Company"]
  353.       colorHighLight = ""
  354.       fontName = "MS Sans Serif"
  355.       fontSize = 8
  356.       validRequired = true
  357.       borderStyle = 7
  358.    endwith
  359.  
  360.  
  361.    this.BOOK1.ENTRYCITY = new ENTRYFIELD(this.BOOK1)
  362.    with (this.BOOK1.ENTRYCITY)
  363.       height = 1
  364.       left = 11.5
  365.       top = 9
  366.       width = 23
  367.       metric = 0
  368.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["City"]
  369.       colorHighLight = ""
  370.       fontName = "MS Sans Serif"
  371.       fontSize = 8
  372.       validRequired = true
  373.       borderStyle = 7
  374.    endwith
  375.  
  376.  
  377.    this.BOOK1.ENTRYSTREET1 = new ENTRYFIELD(this.BOOK1)
  378.    with (this.BOOK1.ENTRYSTREET1)
  379.       height = 1
  380.       left = 11.5
  381.       top = 7
  382.       width = 38
  383.       metric = 0
  384.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Street1"]
  385.       colorHighLight = ""
  386.       fontName = "MS Sans Serif"
  387.       fontSize = 8
  388.       borderStyle = 7
  389.    endwith
  390.  
  391.  
  392.    this.BOOK1.ENTRYSTREET2 = new ENTRYFIELD(this.BOOK1)
  393.    with (this.BOOK1.ENTRYSTREET2)
  394.       height = 1
  395.       left = 11.5
  396.       top = 8
  397.       width = 38
  398.       metric = 0
  399.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Street2"]
  400.       colorHighLight = ""
  401.       fontName = "MS Sans Serif"
  402.       fontSize = 8
  403.       borderStyle = 7
  404.    endwith
  405.  
  406.  
  407.    this.BOOK1.ENTRYCONTACT = new ENTRYFIELD(this.BOOK1)
  408.    with (this.BOOK1.ENTRYCONTACT)
  409.       height = 1
  410.       left = 11.5
  411.       top = 4.5
  412.       width = 25
  413.       metric = 0
  414.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Contact"]
  415.       colorHighLight = ""
  416.       fontName = "MS Sans Serif"
  417.       fontSize = 8
  418.       borderStyle = 7
  419.    endwith
  420.  
  421.  
  422.    this.BOOK1.ENTRYPOSTAL = new ENTRYFIELD(this.BOOK1)
  423.    with (this.BOOK1.ENTRYPOSTAL)
  424.       height = 1.1
  425.       left = 45
  426.       top = 10
  427.       width = 11
  428.       metric = 0
  429.       dataLink = parent.parent.DATAMODREF1.ref.supplier1.rowset.fields["Postal"]
  430.       colorHighLight = ""
  431.       fontName = "MS Sans Serif"
  432.       fontSize = 8
  433.       validRequired = true
  434.       borderStyle = 7
  435.    endwith
  436.  
  437.  
  438.    this.BOOK1.BUTTONOK = new PUSHBUTTON(this.BOOK1)
  439.    with (this.BOOK1.BUTTONOK)
  440.       onClick = class::BUTTONOK_ONCLICK
  441.       visible = false
  442.       height = 1.2
  443.       left = 61
  444.       top = 2
  445.       width = 11
  446.       text = "OK"
  447.       metric = 0
  448.       fontName = "MS Sans Serif"
  449.       fontSize = 8
  450.       group = true
  451.       colorNormal = "BtnText/BtnFace"
  452.       value = false
  453.    endwith
  454.  
  455.  
  456.    this.BOOK1.BUTTONCANCEL = new PUSHBUTTON(this.BOOK1)
  457.    with (this.BOOK1.BUTTONCANCEL)
  458.       onClick = class::BUTTONCANCEL_ONCLICK
  459.       visible = false
  460.       height = 1.2
  461.       left = 61
  462.       top = 3.5
  463.       width = 11
  464.       text = "Cancel"
  465.       metric = 0
  466.       fontName = "MS Sans Serif"
  467.       fontSize = 8
  468.       group = true
  469.       colorNormal = "BtnText/BtnFace"
  470.       value = false
  471.    endwith
  472.  
  473.  
  474.    this.rowset = this.DATAMODREF1.ref.supplier1.rowset
  475.  
  476.    // {Linked Method} form.open
  477.    function form_open
  478.       this.title.text := "<h2>Supplier</h2>"
  479.    return ( SUPER::FORM_OPEN() )
  480.  
  481.    // {Linked Method} form.book1.buttonok.onClick
  482.    function BUTTONOK_onClick
  483.       this.form.dataModRef1.ref.supplier1.rowset.save()
  484.    return ( this.form.close() )
  485.  
  486.    // {Linked Method} form.book1.buttoncancel.onClick
  487.    function BUTTONCANCEL_onClick
  488.       this.form.dataModRef1.ref.supplier1.rowset.abandon()
  489.    return ( this.form.close() )
  490. endclass
  491.